/** 开发环境 */
const DEV = process.env.NODE_ENV !== 'production';
const plugin = [];

if (!DEV) {
  plugin.push([
    'transform-remove-consoles',
    {
      exclude: ['error', 'warn'],
      env: 'production',
      commentWords: ['no remove'],
    },
  ]);
  plugin.push([
    'import',
    {
      libraryName: 'vant',
      libraryDirectory: 'es',
      style: true,
    },
    'vant',
  ]);
}
module.exports = {
  // presets: ['@vue/cli-plugin-babel/preset'],
  presets: [
    [
      '@vue/app',
      {
        useBuiltIns: 'entry',
        targets: {
          ie: 11,
        },
      },
    ],
  ],
  plugins: [...plugin],
};
